<?php use_helper('PA_Links') ?>
<?php if(isset($settings) ? (count($settings) ? true : false) : false):?>
  <form action="<?php echo link_to_app('Core', 'setUserSettings') ?>" id="settingsForm" method="post">
  <table id="inline_table">
    <tr>
      <th> Lp. </th>
      <th> Opis </th>
      <th> Nazwa </th>
      <th> Wartość </th>
    </tr>
  <?php foreach($settings as $id => $setting): ?>
    <tr>
      <td><p id="counter"></p></td>
      <td nowrap="nowrap"><?php echo $setting['description'] ?></td>
      <td><?php echo $setting['name'] ?></td>
      <td><input type="text" name="settings_values[<?php echo $id ?>]" value="<?php echo $setting['value'] ?>"></input></td>
  <?php endforeach; ?>
    <tr id="add">
      <td colspan="4">
        <img src="/images/icons/save.png" class="middle" width="16" height="16" />
        <a onclick="App.Form.submit('settingsForm', true, '<?php echo link_to_app('Core', 'storeSettings') ?>')" class="middle">Zapisz</a>
      </td>
    </tr>
  </table>
  </form>
<?php else: ?>
Brak ustawień
<?php endif; ?>
